<%@ Page Language="C#" MasterPageFile="../main/ManagerMasterPage.master" AutoEventWireup="true" CodeFile="view_user.aspx.cs" Inherits="manager_users_view_user" Title="Edit user" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentBody" Runat="Server">
   <asp:Panel ID="panel_add_user" runat="server">
    
        <h3 align="center">Add/Edit users</h3>
      <table  cellpadding="5" border=1 >
            <tr>
                <td width="10" ></td>
                <td width="100">
                    <asp:Label id="label_username" runat="server" Text="User name:"></asp:Label>
                </td>
                <td >
                    <asp:TextBox ID="text_username" runat="server" ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter username !!!" ControlToValidate="text_username"></asp:RequiredFieldValidator>
                    
                </td>
            </tr>
            <tr>
                <td><!-- --></td>
                <td>
                    <asp:Label id="label_password" runat="server" Text="Password"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="text_password" runat="server" TextMode="Password" ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="text_password"
                        ErrorMessage="Enter password !!!"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td><!-- --></td>
                <td>
                    <asp:Label id="label_confirmPassword" runat="server" Text="Confirm Password:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="text_confirmPassword" runat="server" TextMode="Password" ></asp:TextBox>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="text_password"
                        ControlToValidate="text_confirmPassword" ErrorMessage="Password wrong !!!"></asp:CompareValidator></td>
            </tr>
            <tr>
                <td><!-- --></td>
                <td>
                    <asp:Label id="label_email" runat="server" Text="Email:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="text_email" runat="server" ></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="text_email"
                        ErrorMessage="Email wrong !!!" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></td>
            </tr>
            
            <tr>
                <td><!-- --></td>
                <td>
                    <asp:Label id="label_firstname" runat="server" Text="First name:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="text_firstname" runat="server" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td><!-- --></td>
                <td>
                    <asp:Label id="label_lastname" runat="server" Text="Last name:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="text_lastname" runat="server" ></asp:TextBox>
                </td>
            </tr>
            
            <tr>
                <td><!-- --></td>
                <td>
                    <asp:Label id="label_mobiphone" runat="server" Text="Mobi Phone:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="text_mobiphone" runat="server" ></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="text_mobiphone"
                        ErrorMessage="(must 10 digits)" ValidationExpression="\d{10}"></asp:RegularExpressionValidator>
                </td>
            </tr>
<%--            <tr>
                <td>
                    
                </td>
                <td>
                    <asp:Button ID="button_new" runat="server" Text="New" OnClick="clearText" />
                </td>
            </tr>--%>
        </table>
<br />
<asp:ImageButton ID="button_save" runat="server" ImageUrl="../images/save.gif" OnClick="execute"/>        
    </asp:Panel>
    
    <asp:Panel ID="panel_error" runat="server" Visible="false">
        <asp:Label runat="server" ID="label_error"></asp:Label>
    </asp:Panel>
</asp:Content>

